home *** CD-ROM | disk | FTP | other *** search
/ Software 2000 / Software 2000 Volume 1 (Disc 1 of 2).iso / utilities / u183.dms / in.adf / spread.doc < prev    next >
Encoding:
Text File  |  1989-04-12  |  14.5 KB  |  344 lines

  1.  
  2.  
  3. *****************************************************************************
  4.  
  5.  
  6.    SPREAD - Tiny Amiga spreadsheet
  7.  
  8.    Spread history:
  9.  
  10.    This program grew from a notion I had, 4 years ago, that a
  11. spreadsheet would be a good tool to have, to help with certain jobs at
  12. the office. I had read about VisiCalc, and later Lotus 1-2-3, but I had
  13. never used a spreadsheet, so I designed Spread with few pre-conceived
  14. notions about how it should work. As far as I know, Spread bears little
  15. resemblance to any other spreadsheet.
  16.  
  17.    The first version of Spread was written to run on a PDP-11
  18. running RT11 or TSX, with a VT220 terminal. It was written in Decus C,
  19. it only supported fixed-12-character columns, and only what the screen
  20. could display. It was later enhanced to support a larger worksheet with
  21. scrolling, and to support a 132 column display. Spread is still used at
  22. the office almost use daily.
  23.  
  24.    When I found myself dialing in to work from my Amiga to use
  25. Spread fairly often (a long distance phone call too), I decided it was
  26. time to port the program over to the Amiga.
  27.  
  28.    The PDP-11 Spread used VT220 display controls and accepted VT220
  29. function keys. These are not completely compatible with the features of
  30. the Amiga CON: device, so I decided to re-write the user interface to
  31. make best use of the Intuition's input and output features.
  32.  
  33.    I started work on the Amiga version in early January 1988, and
  34. spent most evenings and weekends at the keyboard (my wife hated it). You
  35. have the result before you.
  36.  
  37.    Amiga Spread supports a few features the PDP11 version doesn't,
  38. specifically the ability of a text cell to overlay empty cells to the
  39. right, the ability to set the column width and decimals, it supports a
  40. larger worksheet (The PDP version must run in only 56K!), and of course
  41. the Intuition interface.
  42.  
  43.    Spread features:
  44.  
  45.    o Small 36 X 60 worksheet
  46.    o Four basic math functions, plus row and column summing
  47.    o Intuition-ized user interface
  48.    o Resizable Workbench window
  49.    o Absolute and symbolic cell references in formulas
  50.    o Worksheet editing: insert/delete row, insert/delete column
  51.    o Cell editing: cut, copy, paste, erase single cells
  52.    o Variable column width and decimal places
  53.    o Automatic or Manual recalculation
  54.  
  55.    Running Spread:
  56.  
  57.    Spread can be invoked from the CLI or launched from a Workbench
  58. icon. If launched from the Workbench, the Lattice C startup code will
  59. first open a standard input/output window, which Spread ignores. It is
  60. recommended that Spread be given a stack size of 8000. A larger stack
  61. size provides no benefit.
  62.  
  63.    If Spread is run from the CLI, you can include a command
  64. parameter specifying the name of a file which Spread will load as the
  65. current spreadsheet.
  66.  
  67.    The Spread window gives a display of (r) rows and (n) columns.
  68. The number of rows and columns depends on the current size of the
  69. display window, the width of the individual columns, and the narrow/wide
  70. font selection. The intersection of each line and column is called a
  71. cell. Cells may be empty, or they may contain text, or they may contain
  72. a formula.
  73.  
  74.    Spread currently supports 60 rows and 36 columns. This is very
  75. small by commercial product standards.
  76.  
  77.    In the window, one cell is displayed in reverse; this indicates
  78. the 'cursor'. The cursor may be moved using the arrow keys, or by
  79. pointing to a cell with the mouse pointer and clicking.
  80.  
  81.    If a movement would place the cursor on a cell which is not in
  82. the display window, the display is scrolled. The horizontal and vertical
  83. scroll bars also move the display window and the cursor.
  84.  
  85.    If a cell contains text, then the text is displayed in the
  86. window in that cell. If the text is wider than the current column's
  87. width, then the text will 'overflow' into empty cells to the right of
  88. the selected cell. If the text is so long that it would overflow into a
  89. cell that is occupied, then the text is truncated at that point.
  90.  
  91.    If a cell contains a formula, then the result of the formula is
  92. displayed in the cell in the window. Calculations are double precision
  93. floating point. The number display is initially 2 decimal places.
  94.  
  95.    The contents of a formula cell is a string in simple algebraic
  96. notation. It is evaluated according to the following rules:
  97. Multiplication ('*'), division ('/'), and modulo ('%') are performed
  98. first, from left to right; then addition ('+') and subtraction ('-')
  99. from left to right; then MAX and MIN left to right; then conditionals
  100. from left to right. The order of evauation can be forced by the use of
  101. parentheses.
  102.  
  103.    If you want a cell to simply contain a number, then make it a
  104. formula cell, and type in the number you want as the formula.
  105.  
  106.    Formula cells may be given logical names. The names can be
  107. referred to in other cells' formulas to call the value from the cell;
  108. this allows cell position changes within the display without affecting
  109. the logical sources for values in formulas. Only formula cells may be
  110. given names. The name must begin with a letter, and may contain
  111. letters and numbers. It may not contain spaces.
  112.  
  113.    Cell editing (text, formula, or name) is done in the string
  114. gadgets at the bottom of the window.
  115.  
  116.    When the cursor is on an empty cell, the entry gadgets at the
  117. bottom of the window are ghosted and cannot be selected. The "Cells"
  118. menu allows the choice of either a text cell or a formula cell. If
  119. "Cells/Edit Text cell" or "Cells/Edit Formula Cell" is chosen, then the
  120. cell type is chosen, the text gadget is enabled and activated, and the
  121. text may be entered immediately.
  122.  
  123.    When the cursor is on a text cell, the cell's text is placed in
  124. the text gadget. This gadget can be selected and the text modified.
  125.  
  126.    When the cursor is on a formula cell, the cell's formula and
  127. name are placed in the text and name gadgets. These can be selected and
  128. modified.
  129.  
  130.    If you wish to change a text cell to a forumla cell or vice
  131. versa, you must erase the current cell and define it anew. The menu
  132. entries "Edit/Cut" or "Edit/Erase" will erase the contents of a cell.
  133.  
  134.    Calculation can be set to automatic or manual. In automatic
  135. mode, whenever a formula cell is edited or any change which may effect
  136. the numeric results of other cells is performed, recalculation takes
  137. place. In manual mode, recalculation is done when the "Calculate/
  138. Evaluate" menu entry is selected, when the user presses the 'C' key, and
  139. upon loading a new spreadsheet from disk, and no other time.
  140.  
  141.    Calculation is done as follows: Each formula in the spreadsheet
  142. is solved, starting in cell R0C0 and moving down, then repeating for
  143. successive columns moving right. Cells which depend on other cells'
  144. values should be placed under or to the right of the cells which supply
  145. the values.
  146.  
  147.    If a cell must make a 'forward' reference, to a cell which will
  148. be calculated later in the spreadsheet, then calculating twice will
  149. usually result in the correct value.
  150.  
  151.    If a calculation can't be performed, the cell will display asterisks
  152. ('****.**') instead of a number. You should inspect your formula to see
  153. what is wrong. You may have left your parentheses unbalanced, or perhaps
  154. you refer to a cell name that you haven't defined. 
  155.  
  156.    Formulas
  157.  
  158.    Formulas are algebraic expressions similar to FORTRAN or BASIC
  159. expressions. Operations proceed left to right, according heirarchy
  160. (multiplication after addition, etc). Expressions may be grouped with
  161. parentheses.
  162.  
  163.    Values are included in an expression using the following
  164. notations:
  165.  
  166.    <value>   - a number, like '10', '-5', '2.34'
  167.    RmCn   - takes the value in the cell at row (m) column (n)
  168.         Special case, either (m) or (n) can be '.', which
  169.         means to use the current row/column
  170.    name   - takes the value in the cell with the given name.
  171.  
  172.    The following arithmetic operators are provided:
  173.  
  174.    +   Addition            p + q
  175.    -   Subtraction            p - q
  176.    *   Multiplication            p * q
  177.    /   Division            p / q
  178.    %   Modulo (remainder from division)   p % q
  179.    MAX   greater of two values         p MAX q
  180.    MIN   lesser of two values         p MIN q
  181.  
  182.    -   Negate               -p
  183.    ABS   Absolute value            ABS(p), ABS p
  184.    INT   Extract integer portion         INT(p), INT p
  185.  
  186.    SUM   Sum of all cells in a row or column above/to the left of
  187.       the current cell. SUM's format:
  188.  
  189.       SUM(RmCn)
  190.  
  191.       'm' and 'n' can be:
  192.          a row/column number
  193.          '.' to specify the current row/column
  194.          '*' to specify all the rows/columns above/to
  195.              the left
  196.       Any of the above formats for 'row' and 'col' can be
  197.       combined except R*C*, which is invalid.
  198.  
  199.    Conditional Binary operators; these are entered as binary
  200. operators (one operand on each side) and give the second operand if the
  201. conditional test on the first operand is true, otherwise they give zero:
  202.  
  203.    ?EQ   op = 0         7 ?EQ 3 = 0   0 ?EQ 3 = 3
  204.    ?NE   op not = 0      7 ?NE 3 = 3   0 ?NE 3 = 0   
  205.    ?GT   op greater than 0   7 ?GT 3 = 3   -7 ?GT 3 = 0
  206.    ?GE   op greater or equal 0   7 ?GE 3 = 3   -7 ?GE 3 = 0
  207.    ?LT   op less than 0      7 ?LT 3 = 0   -7 ?LT 3 = 3
  208.    ?LE   op less or equal 0   7 ?LE 3 = 0   -7 ?LE 3 = 3
  209.  
  210.  
  211.    Spread menu selections:
  212.  
  213.    "Project" Menu
  214.  
  215.    "Project/New": Erases the entire contents of the current
  216. spreadsheet.
  217.  
  218.    "Project/Load": Erases the entire contents of the current
  219. spreadsheet, then loads a previously-saved spreadsheet. This brings up a
  220. requester asking for the name of the file to load.
  221.  
  222.    "Project/Save": Saves the current spreadsheet into a file.
  223. Project/Save uses the same file name as the spreadsheet that was loaded,
  224. or if no file name has been specified, it puts up a requester asking for
  225. the name of the file to save to.
  226.  
  227.    "Project/Save as..": saves the current spreadsheet into a file.
  228. This puts up a requester asking for the name of the file to save to.
  229.  
  230.    "Project/Print": prints to a file a displayable image of the
  231. current spreadsheet. This puts up a requester asking for the name of the
  232. file to print to, which can be "PRT:" to print directly to the printer.
  233. (Note: background printing is not implemented, meaning that Spread will
  234. stall until the spreadsheet had been printed entirely.)
  235.  
  236.    "Project/About Spread": Try it and see.
  237.  
  238.    "Project/Quit": Leaves Spread. If a spreadsheet is loaded it
  239. will be lost; make sure you save it first if you want to keep it. The
  240. close window button in the upper left corner performs the same function.
  241.  
  242.    "Edit" Menu
  243.  
  244.    "Edit/Cut": The current cell is saved in the paste buffer, and
  245. becomes empty. (The 'current' cell is the cell the cursor is positioned
  246. on, which is displayed in reverse.)
  247.  
  248.    "Edit/Copy": The current cell is saved in the paste buffer. The
  249. current cell is not altered.
  250.  
  251.    "Edit/Paste": If the current cell is empty, then the contents of
  252. the paste buffer is placed in the current cell.
  253.  
  254.    "Edit/Erase": The current cell is made empty. It is not saved in
  255. the paste buffer, and the paste buffer is not disturbed.
  256.  
  257.    "Edit/Insert Row": The contents of all cells below and to the
  258. right of the current cell, including the current cell, are shifted one
  259. row down. The current cell and all the cells in the current row to the
  260. right are made empty.
  261.  
  262.    "Edit/Insert Col": The contents of all cells below and to the
  263. right of the current cell, including the current cell, are shifted one
  264. row to the left. The current cell and all cells below the current cell
  265. are made empty.
  266.  
  267.    "Edit/Delete Row": The contents of all cells below and to the
  268. right of the current cell are shifted one row up. The contents of the
  269. current cell, and of all cells in the current row to the right, are
  270. lost.
  271.  
  272.    "Edit/Delete Col": The contents of all cells below and to the
  273. right of the current cell are shifted one row to the left. The contents
  274. of the current cell, and of all cells in the current column below, are
  275. lost.
  276.  
  277.    Warning: If any cells use RmCn notation with actual cell numbers
  278. in a formula, and the target cell is moved by any insert or delete
  279. operation, then it's likely the formula is now incorrect. The cell name
  280. feature should be used when making references to cells in formulas, as
  281. name references are resolved regardless of cell locations.
  282.  
  283.    "Cells" Menu
  284.  
  285.    "Cells/Edit Cell Text": If the current cell is empty, it is made
  286. a text cell. The Text gadget at the bottom of the window is activated,
  287. as if you had clicked on it. Pressing the 'E' key has the same effect as
  288. "Cells/Edit Cell Text", or if the text gadget is not ghosted you may
  289. simply click on it to edit.
  290.  
  291.    "Cells/Edit Cell Formula": If the current cell is empty, it is
  292. made a formula cell. The Text gadget at the bottom of the window is
  293. activated, as if you had clicked on it. Pressing the 'F' key has the
  294. same effect as "Cells/Edit Cell Formula", or if the text gadget is not
  295. ghosted you may simply click on it to edit.
  296.  
  297.    "Cells/Edit Cell Name": The Name gadget at the bottom of the
  298. window is activated, as if you had clicked on it. Pressing the 'N' key
  299. has the same effect as "Cells/Edit Cell Name", or if the name gadget is
  300. not ghosted you may simply click on it to edit.
  301.  
  302.    "Calculate" Menu
  303.  
  304.    "Calculate/Evaluate": The formulas in the current spreadsheet
  305. are solved, and the results of the calculations are displayed in the
  306. formula cells. This is the way to cause calculation if Auto Calc is
  307. disabled, or if a calculation makes a forward referece to a cell (see
  308. 'order of calculation' above).
  309.  
  310.    "Calculate/Auto Calc": When this entry is checked, the 'auto
  311. calc' feature is enabled. Selecting this entry toggles it's state
  312. between enabled (checked) and disabled (not checked).
  313.  
  314.    "Format" Menu
  315.  
  316.    "Format/Set Column Width": This entry brings up a requester
  317. which allows you to enter the width of the current column, by the number
  318. of characters it should hold.
  319.  
  320.    "Format/Set Decimal Places": This entry brings up a requester
  321. which allows you to enter the number of digits to the right of the
  322. decimal point should be printed for formula cells in the current column.
  323.  
  324.    "Format/Set Normal Font": Selecting this entry causes Spread to
  325. use Topaz/8 for cell display.
  326.  
  327.    "Format/Set Narrow Font": Selecting this entry causes Spread to
  328. use the teeny/8 font for cell display. The teeny/8 font distributed with
  329. Spread uses 5 pixel wide character spacing, which can display up to 128
  330. characters on the 640-pixel Workbench screen, although the border
  331. imagery around the Spread window allows only about 120 characters. If
  332. the 'teeny/8' font is not in your current fonts: directory, this menu
  333. selection will be ghosted.
  334.  
  335.    If you generate your own font and call it teeny/8, or copy
  336. another existing font to teeny/8, then Spread will use it with it's
  337. metrics. It should be an 8 pixel high font, but could be a wider or
  338. narrower font, fixed spacing or proportional. Spread will adjust
  339. accordingly.
  340.  
  341.  
  342. ************************************************************************
  343.  
  344.